<template>
	<view class="text-center padding-lr-lg padding-top-lg">
		<view>
			503
		</view>
		<view class="margin-top-lg fc-grey">
			{{ tip }}
		</view>
		<view class="lock" :class="loackName" @click="loackName = 'lock-loading'">
			<view class="lock-wrap">
				<uni-icons type="locked" size="48"></uni-icons>
			</view>
			<view class="lock-after"></view>
		</view>
		<view class="margin-top fc-grey">
			点击开锁检测
		</view>
		<view class="margin-top-xl">
			<u-button type="primary" @click="loackName = ''">完成</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tip: '说明：您可以在房间中关联此智能锁',
				loackName: ''
			}
		}
	}
</script>

<style lang="scss" scoped>
	.lock {
		// position: relative;
		margin: 30px auto;
		width: 180px;
		height: 180px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 0 5px 5px #ededed inset;
		z-index: 9;
		background-color: #fff;
		.lock-wrap {
			width: 160px;
			height: 160px;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 50%;
			box-shadow: 0 0 2px #ccc;
		}
	}
	.lock-loading {
		.lock-after {
			position: absolute;
			width: 177px;
			height: 173px;
			background: linear-gradient(to right, #8EC5FC, #E0C3FC);
			border-radius: 50%;
			z-index: -1;
			animation: rotate 3s linear infinite;
			filter: blur(5px);
		}
	}
	@keyframes rotate {
		from {
			transform: rotate(0deg);
		}
		to {
			transform: rotate(360deg);
		}
	}
</style>